<style>
	.welcome{
		position: absolute;
		left:0;
		right: 0;
		top:0;
		bottom: 0;
		box-sizing: border-box;
		background: url('../static/fistScreen.png') no-repeat center top;
		background-attachment:fixed;
		background-size: 100%;
		z-index: 20002;
	}
	.time{
		font-size: 14px;
		position: absolute;
		top: 20px;
		right: 20px;
		height: 32px;
		line-height: 32px;
		padding: 0 28rpx;
		text-align: center;
		color:#FFF;
		background-color: rgba(50, 50, 50, 0.3);
		border-radius: 17px;
	}
</style>
<template>
	<!-- :style="{backgroundImage:backImg}" -->
	<view class="welcome" id="welcome" ref="welcome" @click="toHome">
		<view ref="time" class="time" @click="toHome">跳过{{num}}S</view>
	</view>
</template>

<script>
	export default{
		data() {
			return {
				isShow:true,
				isClick:false,
				num:5
			}
		},
		mounted() {
			console.log('time')
			let time=this.$refs.time;
			console.log('time',time)
			let a = setInterval(()=>{
				this.num = this.num - 1;
				if(this.num<3){
					time.innerHTML='进入'
					if(this.isClick){
						this.toHome()
					}
				}
				if(this.num==0){
					clearInterval(a);
					this.toHome()
				}
			},1000)
		},
		methods:{
			toHome(){
				this.$emit('hidePop')
			}
		}
	}
</script>